/* es6 严格模式 */
"use strict"

function Spin() {
    this.follow = document.getElementById('follow');
    this.init = function() {
        this.monitor();
    }
    this.monitor = function() {
        /* 鼠标跟随 */
        window.onmousemove = function(event) {
            follow.style.left = eventUtils.getPageX(event) - (follow.offsetWidth / 2) + 'px';
            follow.style.top = eventUtils.getPageY(event) - (follow.offsetHeight / 2) + 'px';
        }
    }
}

var spin = new Spin();
spin.init();